package com.chencong.source;

import com.chencong.env.FlinkTableEnv;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;

/**
 * @Author chencong
 * @Description 从集合中读取
 * @Date 8:01 下午 2021/8/16
 * @Param
 **/
public class SourceArrays {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment streamTableEnvironment = FlinkTableEnv.getStreamTableEnvironment();

        DataStreamSource<String> stringDataStreamSource = streamTableEnvironment.fromCollection(Arrays.asList("1", "2", "3"));

        stringDataStreamSource.print();
        streamTableEnvironment.execute();
    }
}
